<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>

</head>
<body>
<form class="form-horizontal" role="form" id="form">

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">

            <input type="button" value="test" onclick="test()">
            <input type="button" value="test1" onclick="test1()">
            <input type="button" value="test2" onclick="test2()">
            <input type="button" value="test3" onclick="test3()">
            <input type="button" value="test4" onclick="test4()">
            <input type="button" value="test5" onclick="test5()">
            <input type="button" value="test6" onclick="test6()">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">

            <input type="button" value="alertMsg" onclick="alertMsg()">
            <input type="button" value="warnMsg" onclick="warnMsg()">
            <input type="button" value="errMsg1" onclick="errMsg1()">
            <input type="button" value="confirm" onclick="confirm()">
            <input type="button" value="prompt" onclick="prompt()">
        </div>
    </div>
</form>

<script type="text/javascript" src="/lib/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/lib/layer/layer.js"></script>

<script type="text/javascript" src="/lib/handlebars/handlebars-v4.0.5.js"></script>
<script type="text/javascript" src="/lib/handlebars/handlebars-extend.js"></script>

<link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script type="text/javascript" src="/lib/bootstrap/js/bootstrap.min.js"></script>

<script type="text/javascript"  src="/lib/common/common.js"></script>

<link type="text/css" href="/lib/component/css/cc.css" rel="stylesheet" />
<script type="text/javascript"  src="/lib/component/js/cc.js"></script>

<script type="text/javascript">
    function test(){
        var str = "你好{0},我在{1}"
        //str = str.format(["张三","重庆"]);
        str = str.format("张三","重庆");
        alert(str)
    }
    function test1(){
        layer.alert('加了个图标', {icon:1});
    }
    function test2(){
        layer.alert('加了个图标', {icon:2});
    }
    function test3(){
        layer.alert('加了个图标', {icon:3});
    }
    function test4(){
        layer.alert('加了个图标', {icon:4});
    }
    function test5(){
        layer.alert('加了个图标', {icon:5});
    }
    function test6(){
        layer.alert('加了个图标', {icon:6});
    }
    function alertMsg(){
        $.cc.alert("普通框",function(){
            alert(1)
        })
    }
    function warnMsg(){
        $.cc.warn("普通框",function(){
            alert(1)
        })
    }
    function errMsg1(){
        $.cc.error("普通框",function(){
            alert(1)
        })
    }
    function confirm(){
        $.cc.confirm("询问",function(){
            alert(1)
        },function(){
            alert(2)
        })
    }
    function prompt(){
        $.cc.prompt("",function(text){
            alert(text)
        },{ formType:2,"title":"xxxxxxxxxxxxx"})
    }
</script>
</body>
</html>
